home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / SAT 2.4.0 & updates ƒ / SAT-TCL and demo / SAT-TCL / CSATDirector.p next >
Encoding:
Text File  |  1995-12-18  |  3.7 KB  |  149 lines  |  [TEXT/PJMM]

  1. {****************************************************}
  2. {}
  3. {        CSATDirector.p                                                                                                                                                                                                }
  4. {}
  5. {        Methods for the director class by which the THINK Class Library can be    used         }
  6. {        with the Sprite Animation Toolkit.                                                                                                                                     }
  7. {}
  8. {****************************************************}
  9.  
  10.  
  11. unit CSATDirector;
  12.  
  13. interface
  14.  
  15.     uses
  16.         TCL, SATTCLIntf;
  17.  
  18. implementation
  19.  
  20.  
  21. {****************************************************}
  22. {}
  23. {        ISATDirector                                                                                                                                                                                                    }
  24. {}
  25. {        Initializes the SAT director class.                                                                                                                                        }
  26. {}
  27. {****************************************************}
  28.  
  29.     procedure CSATDirector.ISATDirector (aSupervisor: CApplication);
  30.  
  31.     begin { ISATDirector }
  32.         IDirector(aSupervisor);
  33.  
  34.         itsSATPane := nil;
  35.     end; { ISATDirector }
  36.  
  37.  
  38. {****************************************************}
  39. {}
  40. {        Free                                                                                                                                                                                                                                }
  41. {}
  42. {        Free the SAT director class, and close down any sounds. This is a good place        }
  43. {        to delete any sprites and sounds which you have created.                                                                    }
  44. {}
  45. {****************************************************}
  46.  
  47.     procedure CSATDirector.Free;
  48.  
  49.     begin { Free }
  50.         SATSoundShutup;
  51.  
  52.         itsSATPane := nil;
  53.  
  54.         inherited Free;
  55.     end; { Free }
  56.  
  57.  
  58. {****************************************************}
  59. {}
  60. {        BuildWindow                                                                                                                                                                                                        }
  61. {}
  62. {        In this method, you should build the window as you want it, and set                                    }
  63. {        itsSATPane to point to the single instance of the CSATPane class.                                        }
  64. {}
  65. {****************************************************}
  66.  
  67.     procedure CSATDirector.BuildWindow;
  68.  
  69.     begin { BuildWindow }
  70.     end; { BuildWindow }
  71.  
  72.  
  73. {****************************************************}
  74. {}
  75. {        SetUpSprites                                                                                                                                                                                                        }
  76. {}
  77. {        In this method, you should build the sprites as you want them, using the SAT        }
  78. {        commands.                                                                                                                                                                                                            }
  79. {}
  80. {****************************************************}
  81.  
  82.     procedure CSATDirector.SetUpSprites;
  83.  
  84.     begin { SetUpSprites }
  85.     end; { SetUpSprites }
  86.  
  87.  
  88. {****************************************************}
  89. {}
  90. {        SetUpSounds                                                                                                                                                                                                        }
  91. {}
  92. {        In this method, you should build the sounds as you want them, using the SAT        }
  93. {        commands.                                                                                                                                                                                                            }
  94. {}
  95. {****************************************************}
  96.  
  97.     procedure CSATDirector.SetUpSounds;
  98.  
  99.     begin { SetUpSounds }
  100.     end; { SetUpSounds }
  101.  
  102.  
  103. {****************************************************}
  104. {}
  105. {        PrepareForPlaying                                                                                                                                                                                    }
  106. {}
  107. {        In this method, do things which should be done before the game loop begins.            }
  108. {        The default method prepares the SAT pane for drawing.                                                                        }
  109. {}
  110. {****************************************************}
  111.  
  112.     procedure CSATDirector.PrepareForPlaying;
  113.  
  114.     begin { PrepareForPlaying }
  115.         if itsSATPane <> nil then begin
  116.                 itsSATPane.PrepareForSATRun;
  117.             end; { if }
  118.     end; { PrepareForPlaying }
  119.  
  120.  
  121. {****************************************************}
  122. {}
  123. {        DoPlay                                                                                                                                                                                                                        }
  124. {}
  125. {        This method should implement the game loop.                                                                                                        }
  126. {}
  127. {****************************************************}
  128.  
  129.     procedure CSATDirector.DoPlay;
  130.  
  131.     begin { DoPlay }
  132.     end; { DoPlay }
  133.  
  134.  
  135. {****************************************************}
  136. {}
  137. {        FinishPlaying                                                                                                                                                                                                        }
  138. {}
  139. {        In this method, do things which should be done after the game loop ends.                        }
  140. {}
  141. {****************************************************}
  142.  
  143.     procedure CSATDirector.FinishPlaying;
  144.  
  145.     begin { FinishPlaying }
  146.     end; { FinishPlaying }
  147.  
  148.  
  149. end. { CSATDirector }